# -*- coding: utf-8 -*-
# @Time : 2023/9/17 16:21
# @Author : kouyaxin
# @File : roundid.py


import os
from locust import HttpUser, task, between


class MyUser(HttpUser):
    wait_time = between(0.01, 0.02)

    @task(10)
    def computeOrderCouponPlan(self):
        headers = {
            "authority": "gateway.fengjinketang.com",
            "authorization": "_v3_7e4651ba-9c30-4794-86b5-d7ad4bd5bcb8",
            "content-type": "application/json",
            "token": "_v3_7e4651ba-9c30-4794-86b5-d7ad4bd5bcb8",
        }
        data = {"appId": "wx101d5aebaa6b0c29", "timestamp": 1694934057746, "data": {"roundId": "32863"}}

        self.client.post(
            "/gateway/api/edu-fengjin-app-web/learn/queryRoomIdByRoundId",
            headers=headers,
            json=data,

        )


if __name__ == "__main__":
    os.system('locust -f computeOrderCouponPlan.py --host=https://api.hongsong.info')

# locust -f queryRoomIdByRoundId.py --host=https://api.hongsong.info
